import orm from '@main/db/orm'
import { IpcHandler, IpcInvoke } from '@main/decorator/ipc.decorator'
import { Injectable } from '@nestjs/common'
import type { Agent } from '@shared/types/entity'
@IpcHandler('agent')
@Injectable()
export class AgentApi {
  @IpcInvoke('getList')
  async getList(): Promise<Agent[]> {
    return await orm.query.agent.findMany()
  }
}
